<extend name="Base/common"/>
<block name="header">
{:hook('mobileTopNav',array('title'=>$meta_title))}
</block>

<block name="body">
  <form action="{:U('UserAccount/update')}" method="post">
    <switch name="type">
      <case value="alipay">
        <div class="control-group">
          <input type="text" name="name" value="" id="inputName" class="" placeholder="您的姓名">
        </div>
        <div class="control-group">
          <input type="text" name="account" value="" id="inputNumber"  onkeypress="keyPress()" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" class="" placeholder="支付宝账户">
        </div>
        <div class="control-group">
          <input type="text" name="reaccount" value="" id="inputReNumber"  onkeypress="keyPress()" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" class="" placeholder="确认支付宝账户">
        </div>
      </case>
      <case value="bankcard">
        <div class="control-group">
          <input type="text" name="name" value="" id="inputName" class="" placeholder="持卡人姓名">
        </div>
        <div class="control-group">
          <select name="bankname">
            <option value="">请选择银行</option>
            <volist name="lists" id="vo">
              <option value="{$key}">{$vo}</option>
            </volist>
          </select>
        </div>
        <div class="control-group">
          <input type="number" name="account" value=""  onkeypress="keyPress()" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" id="inputNumber" class="" placeholder="卡号">
        </div>
        <div class="control-group">
          <input type="number" name="reaccount" value=""  onkeypress="keyPress()" onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" id="inputReNumber" class="" placeholder="确认卡号">
        </div>
      </case>
      <default/>
    </switch>
    <div id="Z_bind_verify" class="control-group">
      <input type="text" name="verify" id="verify" maxlength="4" placeholder="图形验证码">
      <img class="verifyimg J_reload_verify" style="width: 86px; height: 30px; position: absolute; right: 10px; top:8px;" title="点击更换" src="{:U('User/verify')}">
    </div>
    <input type="hidden" name="username" class="Z_mobile" value="{$user.mobile}" id="Z_input_username" placeholder="您的手机号" errormsg="请填写正确的手机" nullmsg="请填写手机" datatype="m">
    <div class="control-group">
      <input type="tel" name="randcode" class="Z_mobile_randcode" maxlength="6" placeholder="短信验证码">
      <a href="javascript:;" class="btn btn-primary btn-randcode Z_mobile_randcode_button">获取验证码</a>
    </div>
    <div class="control-action">
      <button class="btn btn-positive btn-block">提交绑定</button>
    </div>
    <input type="hidden" name="type" value="{$type}">
  </form>
</block>

<block name="script">
  <script type="text/javascript">
    seajs.use('user', function(user){
      user.getRandCode('withdrawbind');
    });
    function keyPress() {
        var keyCode = event.keyCode;
        if ((keyCode >= 48 && keyCode <= 57))
        {
            event.returnValue = true;
        } else {
            event.returnValue = false;
        }
    }
  </script>
</block>